package com.example.simpleforum.model;

import java.sql.Timestamp;

/**
 * 板块管理员关联实体类
 */
public class ForumAdminRelation {
    private int id;                 // 记录ID
    private int forumId;            // 板块ID
    private int userId;             // 用户ID
    private Timestamp grantTime;    // 授权时间
    private int grantedById;        // 授权管理员ID

    // 构造函数
    public ForumAdminRelation() {
    }

    public ForumAdminRelation(int forumId, int userId, int grantedById) {
        this.forumId = forumId;
        this.userId = userId;
        this.grantedById = grantedById;
    }

    // Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getForumId() {
        return forumId;
    }

    public void setForumId(int forumId) {
        this.forumId = forumId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public Timestamp getGrantTime() {
        return grantTime;
    }

    public void setGrantTime(Timestamp grantTime) {
        this.grantTime = grantTime;
    }

    public int getGrantedById() {
        return grantedById;
    }

    public void setGrantedById(int grantedById) {
        this.grantedById = grantedById;
    }

    @Override
    public String toString() {
        return "ForumAdminRelation{" +
                "id=" + id +
                ", forumId=" + forumId +
                ", userId=" + userId +
                ", grantTime=" + grantTime +
                ", grantedById=" + grantedById +
                '}';
    }
}